<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <link rel="stylesheet" type="text/css" href="../../index/css/reset.css"/>
    <link rel="stylesheet" type="text/css" href="../../index/css/style.css"/>
    <script src="https://www.jq22.com/jquery/jquery-1.10.2.js"></script>
    <script src="../../index/laydate/laydate.js"></script>
    <script src="https://www.jq22.com/jquery/echarts-4.2.1.min.js"></script>
    <script src="../../index/js/index.js"></script>
    <script src="../../index/js/jquery.nicescroll.min.js"></script>


    <link rel="shortcut icon" href="favicon.ico"> <link href="/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

    <link href="/css/animate.min.css" rel="stylesheet">
    <link href="/css/style.min.css?v=4.0.0" rel="stylesheet"><base target="_blank">
    <!-- Sweet Alert -->
    <link href="/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <!-- 弹窗-->
    <script src="../../tanchuan/js/jquery-2.0.0.min.js"></script>
    <link href="../../tanchuan/css/displaystyle.css" rel="stylesheet" />
    <script src="../../tanchuan/js/syntaxhighlighter_3.0.83/shCore.js"></script>
    <script src="../../tanchuan/js/syntaxhighlighter_3.0.83/shBrushJScript.js"></script>
    <link href="../../tanchuan/js/syntaxhighlighter_3.0.83/styles/shCoreRDark.css" rel="stylesheet" />
    <script src="../../tanchuan/js/NZ-Plugin/Js/NZ-Window.min.js"></script>
    <link href="../../tanchuan/js/NZ-Plugin/Css/NZ-Window.min.css" rel="stylesheet" />
    <script src="../../tanchuan/js/NZ-Plugin/Js/NZ-Drag.min.js"></script>
</head>
<body>
<!-- Defining the fragment -->
<div  class="comm_cont" th:fragment="stock-fragment(result)">
            <span th:text="${result.name}" />
            <span style="font-size:18px;color: red" th:text="${result.lbc}+'板' " th:id="'redian_'+${result.code}" onclick="stockReDianKan24Hour(this)"> </span>
            <i th:if="${result.fund} ge 100000000" >
                <span style="color: red;" th:text="${result.fund/100000000}+'亿'" th:id="${result.code}" onclick="wtchK(this)"/>
            </i>
            <i th:if="${result.fund} lt 100000000" >
                <span style="color: red;" th:text="${result.fund/10000000}+'亿'" th:id="${result.code}" onclick="wtchK(this)"/>
            </i>
                    <!-- 涨跌 -->
             <span style="color: red;" th:text="${result.zdp} +'%'" th:id="'kandian_'+${result.code}" onclick="stockKanDian(this)"/>
</div>



<!-- 涨停池 -->
<div  class="abort_cont" th:fragment="Stock_ZTC(result)">
    <!-- 名称 -->
    <span  style="color:coral;" th:text="${result.name}" />
    <!-- 破板 -->
    <span th:if="${!#strings.isEmpty(result.openNum)}" th:text="${result.openNum} +'次'" th:id="'kandian_'+${result.code}" onclick="stockKanDian(this)" />
    <span th:if="${#strings.isEmpty(result.openNum)}" th:text="--" th:id="'kandian_'+${result.code}" onclick="stockKanDian(this)" />

    <!-- 几天几板 -->
    <span style="color: red;" th:text="${result.highDays}" />
    <!--  涨停形态 -->
    <span th:text="${result.limitUpType}" />
    <!-- 换手率 -->
    <span th:text="${result.turnoverRate} +'%'" />
    <!-- 封单额 -->
    <span th:text=" ${ #numbers.formatDecimal(result.orderAmount/100000000,1,'COMMA',2,'POINT')}+'亿'" />
</div>


<!-- 冲刺涨停 -->
<div  class="comm_cont" th:fragment="Stock_CCZT(result)">
    <!-- 名称 -->
    <span style="color:coral;" th:text="${result.name}" />
    <!-- 涨跌 -->
    <span th:if="${result.changeRate} ge 0" style="color: red;" th:text="${result.changeRate} +'%'" th:id="'kandian_'+${result.code}" onclick="stockKanDian(this)"/>
    <span th:if="${result.changeRate} lt 0" style="color: green;" th:text="${result.changeRate} +'%'" th:id="'kandian_'+${result.code}" onclick="stockKanDian(this)"/>

    <!-- 开扳次数 -->
    <span th:text="${result.latest}" />
    <!-- 换手率 -->
    <span th:text="${result.turnoverRate} +'%'" />
    <!-- 成交额 -->
    <span th:text=" ${ #numbers.formatDecimal(result.turnover/100000000,1,'COMMA',2,'POINT')}+'亿'" />
</div>

<!-- 连扳池 -->
<div  class="comm_cont" th:fragment="Stock_LBC(result)">
    <!-- 名称 -->
    <span  style="color:coral;" th:text="${result.name}" />
<!--    &lt;!&ndash; 涨跌 &ndash;&gt;-->
<!--    <span th:if="${result.changeRate} ge 0" style="color: red;" th:text="${result.changeRate} +'%'" th:id="'kandian_'+${result.code}" onclick="stockKanDian(this)"/>-->
<!--    <span th:if="${result.changeRate} lt 0" style="color: green;" th:text="${result.changeRate} +'%'" th:id="'kandian_'+${result.code}" onclick="stockKanDian(this)"/>-->
    <!-- 几天几板 -->
    <span style="color: red;" th:text="${result.highDays}" th:id="'kandian_'+${result.code}" onclick="stockKanDian(this)" />
    <!--  涨停形态 -->
    <span th:text="${result.limitUpType}" />
    <!-- 换手率 -->
    <span th:text="${result.turnoverRate} +'%'" />
    <!-- 封单额 -->
    <span th:text=" ${ #numbers.formatDecimal(result.orderAmount/100000000,1,'COMMA',2,'POINT')}+'亿'" />
</div>


<!-- 炸板池 -->
<div  class="comm_cont" th:fragment="Stock_ZBC(result)">
    <!-- 名称 -->
    <span style="color:coral;" th:text="${result.name}" />
    <!-- 涨跌 -->
    <span th:if="${result.changeRate} ge 0" style="color: red;" th:text="${result.changeRate} +'%'" th:id="'kandian_'+${result.code}" onclick="stockKanDian(this)"/>
    <span th:if="${result.changeRate} lt 0" style="color: green;" th:text="${result.changeRate} +'%'" th:id="'kandian_'+${result.code}" onclick="stockKanDian(this)"/>

    <!-- 开扳次数 -->
    <span th:text="${result.openNum}" />
    <!-- 换手率 -->
    <span th:text="${result.turnoverRate} +'%'" />
    <!-- 成交额 -->
    <span th:text=" ${ #numbers.formatDecimal(result.turnover/100000000,1,'COMMA',2,'POINT')}+'亿'" />
</div>

<!-- 跌停池 -->
<div  class="comm_cont" th:fragment="Stock_DTC(result)">
    <!-- 名称 -->
    <span style="color:coral;" th:text="${result.name}" />
    <!-- 涨跌 -->
    <span style="color: green;" th:text="${result.changeRate} +'%'" th:id="'kandian_'+${result.code}" onclick="stockKanDian(this)"/>
    <!-- 价格 -->
    <span style="color: green;" th:text="${result.latest}" />
    <!-- 换手率 -->
    <span th:text="${result.turnoverRate}" />
    <!-- 流通市值 -->
    <span th:text="${result.currencyValue}" />
</div>

</body>
<script src="/js/bootstrap.min.js?v=3.3.5"></script>
<script src="/js/plugins/sparkline/jquery.sparkline.min.js"></script>
<script src="/js/plugins/peity/jquery.peity.min.js"></script>
<script src="/js/content.min.js?v=1.0.0"></script>
<script src="/js/demo/peity-demo.min.js"></script>
<script src="/js/plugins/gritter/jquery.gritter.min.js"></script>
<script src="/js/plugins/sweetalert/sweetalert.min.js"></script>
<script type="text/javascript">
    var size= [[${size}]];
    //
    var tradeMinutes = [[${objMinutes_}]];
    var yesToDayAmount = [[${objyestoDayAmount_}]];
    var toDayAmount = [[${objToDayAmount_}]];
    //

</script>
<script>

    $(".order_num").each(function(){
        var that=$(this);
        var text1=that.text();
        var text1_1=parseInt(text1);
        var te=formatNum(text1_1+"");
        that.text(te)
    })


    function formatNum(str) {
        var newStr = "";
        var count = 0;
        if (str.indexOf(".") == -1) {
            for (var i = str.length - 1; i >= 0; i--) {
                if (count % 3 == 0 && count != 0) {
                    newStr = str.charAt(i) + "," + newStr;
                } else {
                    newStr = str.charAt(i) + newStr;
                }
                count++;
            }
            str = newStr;
            return str;
        }

    }

    function chakanxaingxing(object) {
        var code = object.id;
        var url = 'http://stockpage.10jqka.com.cn/' + code;
        $.NZ_Window.show({
            url: url,
            width: 1100,
            height: 800,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
        // window.open('/stockMinutes?code='+code,'','width=2000,height=1000,left=200,top=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');
    }
    function stockKanDian(object) {
        var code = object.id;
        var url = 'stockKanDian?code=' + code.replace("kandian_", "");
        $.NZ_Window.show({
            url: url,
            width: 1100,
            height: 800,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
        // window.open('/stockMinutes?code='+code,'','width=2000,height=1000,left=200,top=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');
    }

    function stockReDianKanOneHour(object){
        var code=object.id;
        $.NZ_Window.show({
            url: '/ths/stockKanDian?type=oneHour&code='+code,
            width: 1500,
            height: 1000,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
        // window.open('/stockMinutes?code='+code,'','width=2000,height=1000,left=200,top=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');
    }

    function stockReDianKan24Hour(object){
        var code=object.id;
        $.NZ_Window.show({
            url: '/ths/stockKanDian?type=24Hour&code='+code,
            width: 1500,
            height: 1000,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
        // window.open('/stockMinutes?code='+code,'','width=2000,height=1000,left=200,top=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');
    }

    function stockMinutes30(object){
        var code=object.id;
        $.NZ_Window.show({
            url: '/stockMinutes30?code='+code,
            width: 1500,
            height: 1000,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
        // window.open('/stockMinutes?code='+code,'','width=2000,height=1000,left=200,top=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');
    }

    function openUrl(url){
        window.open(url,"_blank");
    }

    function chakanBanKuai(object){
        var code=object.id;
        var url= 'http://quote.eastmoney.com/bk/'+code+'.html#fullScreenChart';
        $.NZ_Window.show({
            url: url,
            width: 1100,
            height: 800,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
        // window.open('/stockMinutes?code='+code,'','width=2000,height=1000,left=200,top=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');
    }
    function banKuaiMaoLiLv(object) {
        var code=object.id;
        var url = 'banKuaiMaoLiLv?banKuai='+code;
        $.NZ_Window.show({
            url: url,
            width: 1100,
            height: 800,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
    }

    function openNewWindows(url){
        // var code=object.id;
        // var url= 'http://quote.eastmoney.com/bk/'+code+'.html';
        $.NZ_Window.show({
            url: url,
            width: 1100,
            height: 800,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
        // window.open('/stockMinutes?code='+code,'','width=2000,height=1000,left=200,top=300,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');
    }
    function wtchK(object){
        var code=object.id;
        $.NZ_Window.show({
            url: "https://quote.eastmoney.com/concept2/"+code+".html#fullScreenChart",
            //url: 'https://t.10jqka.com.cn/m/'+code+'/touzi/',
            width: 1500,
            height: 1000,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
    }

    function wtchInfo(){
        $.NZ_Window.show({
            url: "https://www.yuque.com/yonghengguodu-fohhs/us5yes/badxyrcgm6tw50wg?singleDoc# 《精研 3.0 使用说明》",
            //url: 'https://t.10jqka.com.cn/m/'+code+'/touzi/',
            width: 1500,
            height: 1000,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
    }

    function querySinaStockInfo(){
        var xhr = new XMLHttpRequest();
        xhr.open('POST', 'http://hq.sinajs.cn/list=s_sh000001', true);
        xhr.setRequestHeader('Referer', 'https://finance.sina.com.cn');
        xhr.onreadystatechange = function () {
            if (xhr.readyState === 4) {
                if (xhr.status === 200) {
                    var response = JSON.parse(xhr.responseText);
                    console.log(response);
                } else {
                    console.log('Error: ' + xhr.status);
                }
            }
        };
        xhr.send();
    }


    function showTag(url){
        $.NZ_Window.show({
            url: url,
            width: 1500,
            height: 1000,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
    }

    function zuoT(){
        $.NZ_Window.show({
            url: "/zuot/stockKey",
            width: 500,
            height: 1000,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
    }

    function stockTBykey(object) {
        var code = object.id;
        var url = '/zuot/stockKey?key=' + code.replace("kandian_", "");
        $.NZ_Window.show({
            url: url,
            width: 500,
            height: 1000,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
    }

    function stockTByIndex(object) {
        var code = object.id;
        var url = '/zuot/index?key=' + code.replace("kandian_", "");
        $.NZ_Window.show({
            url: url,
            width: 500,
            height: 800,
            operate: {
                btn_Close: true, //关闭按钮
                btn_Max: true, //最大化按钮
                btn_Refresh: true, //刷新按钮
                btn_NewWindow: true, //新窗口按钮
                resize: true //调整窗口大小按钮
            }
        });
    }


</script>
</html>
